<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>组件的代码模板——使用 template</title>
</head>
<body>
<div id="app">
    <cpn></cpn>
</div>

<template id="cpn">
    <!--  <div>
        <h1>Hello， World！</h1>
        <h1>世界，您好！</h1>
      </div>-->
    <h1>Hello， World！</h1>
    <h1>世界，您好！</h1>
</template>


<script type="module">
    import {createApp, defineComponent} from "../../../../js/vue.esm-browser.js";

    let cpn = defineComponent(
        {
            template: "#cpn",
        }
    );

    let app = createApp({
        setup() {
            return {}
        },
        components: {
            cpn
        }
    })

    app.mount("#app")
</script>
</body>
</html>